#pragma once

class tagSearchEnginElememt
{
public:
	int	state;
	CString name;
	CString url;
	CString icon;
};  


class CSearchEngineList
{
public:
	void Clean();
	int Lookup(LPCTSTR key, CString& rValue);
	BOOL LoadSearchList();
	int  GetIconIndex(int nIndex);
	int  m_nIconCount;
	virtual ~CSearchEngineList();
	CArray<tagSearchEnginElememt*, tagSearchEnginElememt*> m_Searchs;
};

class tagLastCloseEmlemt
{
public:
	CString strTitle;
	CString strUrl;
};

class CLastClosedList
{
public:
	BOOL Load();
	BOOL Save();
	
	~CLastClosedList();
	CLastClosedList();

	tagLastCloseEmlemt*	GetByIndex(int nIndex);
	BOOL Add(CString strTitle, CString strURL);

	BOOL Remove(int nIndex);
public:

	CList<tagLastCloseEmlemt*, tagLastCloseEmlemt*> m_list;
};

class CXIEConfig
{
public:
	CXIEConfig(void);
	~CXIEConfig(void);

private:

	static CXIEConfig* m_pInstance;

public:

	static CXIEConfig* GetInstance()
	{
		if (!m_pInstance)
			m_pInstance = new CXIEConfig;
		return m_pInstance;
	}
	
	CSearchEngineList	m_SearchEngine;
	CLastClosedList		m_LastCloseList;
};


